import demo.User1;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class App2 {
    public static void main(String[] args) {
        BeanFactory context = new XmlBeanFactory(new ClassPathResource("spring1.xml"));
        User1 user1 = (User1) context.getBean("user");
        user1.say();
    }
}
